﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmployeeShow.aspx.cs" Inherits="Automobile.service.UI.EmployeeShow" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>


<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>员工列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统设置 <span class="c-gray en">&gt;</span> 员工设置 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a><a class="btn btn-primary radius" href="EmployeeAdd.aspx" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加</a></span> <span class="r">共有数据：<strong><%=Session["count"]%></strong> 条</span> </div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort" id="psser">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="80">员工名称</th>
                    <th width="120">登录密码</th>
					<th width="80">联系电话</th>
					<th width="120">联系地址</th>
					<th width="60">备注</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
 
	</div>
    <script src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript">
</script> 
<script>
    $(function () {
        $.ajax({
            type: "post",
            url:"Handler/HandlerEmp_Show.ashx",
            success: function (data) {
                var data1 = eval(data);
                $(data1).each(function (index, item) {
                    var por = "<tr class='text-c'><td width='25'><input type='checkbox'></td><td>" + item.Employee_Name + "</td><td>" + item.Employee_Pwd + "</td><td>" + item.Employee_Phone + "</td><td>" + item.Employee_Addr + "</td><td>" + item.Employee_Remark + "</td><td><input id='Button1' type='button' value='修改' onclick='fun(" + item.Employee_Id + ")' /><input id='Button2'type='button'value='删除' onclick='del(" + item.Employee_Id + ")' /></td></tr>";
                    $("#psser tbody").append(por);
                })
            }
        })
    })
    function fun(id)
    {
        location.href = 'EmployeeEdit.aspx?id=' + id;
    }
    function del(id)
    {
        if (confirm("好好考虑下呗?"))
        {
            $.ajax({
                type: "post",
                url: "Handler/HandlerEmp_Del.ashx",
                data: {
                    id: id
                },
                success: function (data) {
                    if (data > 0) {
                        alert("删除成功");
                        location.reload();
                    }
                    else {
                        alert("删除失败");
                    }

                },
                error: function () {
                    alter("你脑子坏特拉");
                }
            })
        }
    }
</script>    
    </body>
</html>